<template>
	<view class="">
		<xxm-child @add='onAdd' @input='inInput'></xxm-child>
		<view class="box" :style="{background:color,fontSize: size + 'px'}">接受子num: {{num}}, input: {{input}}</view>
	</view>
</template>

<script setup>
import { ref } from 'vue';

	const num = ref(0)
	const color = ref()
	const input = ref()
	const size = ref(12)
	function onAdd(e){
		num.value = e
		color.value = '#' + Math.floor(e * 0x1000000).toString(16);
	}
	
	function inInput(e){
		input.value = e
	}
</script>

<style lang='scss' scoped>
.box{
	width: 200px;
	height: 200px;
}
</style>
